<include file="Public:header" />
<include file="Public:leftside" />
<style type="text/css">
	.modal {
	    height: 600px;
	   
	}
	.modal-infp-style {
		width: 90%;
		margin: 10px auto;
	}
	
	.modal-infp-style table {
		width: 100%;
	}
	
	.modal-infp-style table tr td {
		border: 1px solid #e6e6e6;
		padding: 8px;
	}
	
	a:hover {
		cursor: pointer;
	}

	.pagination a{display: block;float: left;border-bottom-left-radius: 3px;border-top-left-radius: 3px;padding: 5px 10px;font-size: 12px;font-weight: 500;border-radius: 2px;}
	.pagination span{display: block;float: left;border-bottom-left-radius: 3px;border-top-left-radius: 3px;background-color: #fafafa;border: 1px solid #dddddd;padding: 5px 10px;font-size: 12px;font-weight: 500;border-radius: 2px;}
	table tr{margin: 6px 0;float: left;width: 100%;}
	.quyu{float: left; margin-right: 5px;}
</style>
<div class="main-content">
	<div class="breadcrumbs breadcrumbs-fixed" id="breadcrumbs">
		<ul class="breadcrumb">
			<li> <i class="icon-home home-icon"></i>
				<a href="/">首页</a>
			</li>
			<li>城市合伙人管理</li>
			<li  class="active">重置密码</li>
		</ul>
	</div>
	<section class="scrollable wrapper">

		<!-- 操作提示  start -->
		<!-- 操作提示  end -->

		<div class="row padder-v">
			<div class="col-sm-9" style="width:65%;">
				<a href="{:U('Users/city_partner')}" class="btn btn-sm btn-danger" onclick="add_user();"> 返回 </a>
			</div>
		</div>
		<div style="height:0;overflow:hidden;" data="清除浏览器自动填充 勿删">
			<input type="text"   value="" name="111" id="2121">
			<input type="password"  value=" "  name="222" id="211212121">
		</div>
			<div class="table-responsive" style="margin-left: 10px">
				<table class="modal-tab">
					<tbody>
					<tr>
						<td style="width:80px;">姓名</td>
						<td colspan="3">

							<input type="text" id="name"  autocomplete="off" value="{$rs_p.name}" readonly>
						</td>
					</tr>
					<tr>
						<td style="width:80px;">手机</td>
						<td colspan="3">

							<input type="text" id="phone"  autocomplete="off" value="{$rs_p.phone}" readonly>
						</td>
					</tr>

					<tr>
						<td style="width:80px;">新密码</td>
						<td colspan="3">
							<input type="password" id="password"  value="">
						</td>
					</tr>
					<input type="hidden" id="u_id" value="{$rs_p.id}">

					</tbody>
				</table>
			</div>
		<div class="col-md-offset-3 col-md-9">
			<button class="btn btn-primary btn-sm bq"  value="保存" type="button">保存</button>
			&nbsp; &nbsp; &nbsp;
			<button class="btn btn-primary btn-sm btn-danger" value="取消" type="button" onclick="history.back(-1);">取消</button>
		</div>
</section>
</div>
<script>
	$(function () {
        $('.bq').click(function () {
          	var password=$('#password').val();
      		var id= $('#u_id').val();
            if(password==''){
                layer.msg('新密码请填写完整');
                return;
            }
            if(id==''){
                layer.msg('代码错误，请联系管理员');
                return;
            }
             $.post(
                "{:U('Users/city_partner_passedit')}",
                {id:id,password:password},
                function(result){
                    if(result==0){
                        layer.msg('添加失败');
                    }
                    if(result==1){
                        layer.msg('添加成功');
                        setTimeout(window.location.href='/Users/city_partner.html',1000)
                    }
                    if(result==2){
                        layer.msg('编辑成功');
                        setTimeout(window.location.href='/Users/city_partner.html',1000)
                    }
                    if(result==3){
                        layer.msg('编辑失败');
                    }
                    if(result==4){
                        layer.msg('该账户已存在！');
                    }

                }
            );
        })
    })
</script>
<include file="Public:footer" />